#coding=utf-8

import sqlite3

cx = sqlite3.connect("e:\my-photoview\pv.db")
cu = cx.cursor()
#建表
#rs = cu.execute("CREATE TABLE catalog (id integer primary key, pid integer, name varchar(200) unique)")
#print rs

#cu.execute("INSERT INTO catalog (pid,name) VALUES(1,'name3')")
#cu.execute("INSERT INTO catalog (pid,name) VALUES(2,'name2')")
cu.execute("SELECT * FROM catalog")
print cu.fetchall()
cx.commit()